<%namespace name="h" module="cpswarehouse.helpers"/>
<%inherit file="/base.mako"/>\

<%def name="header()">${h.titlecase(school.name)}</%def>
${h.split_address(school.address)}

<br/><br/>
<div id='yearbyyear' class='graph' style='width: 400px; height: 200px;'></div>
<br/>
<table class="data">
  <tr>
    <th>Year</th>
    <th>Asian</th>
    <th>Black</th>
    <th>Hispanic</th>
    <th>Native American</th>
    <th>White</th>
  </tr>
  % for year in year_query:
  <tr>
    <td>
      <a href="${request.route_url("school_detail_by_year", school=school.name, year=year.year)}">
        ${year.year}
      </a>
    </td>
    <td>${year.asian}</td>  
    <td>${year.black}</td>  
    <td>${year.hispanic}</td>
    <td>${year.nativeamerican}</td>  
    <td>${year.white}</td>  
  </tr>
  % endfor
</table>

<script type="text/javascript">
${year_chart|n}
</script>
